<?php
/**
 * @package			ALM ProductControl
 * @version			$Id:$
 * @subpackage		com_almapc
 * @autor			ALM Studio
 * @copyright		Copyrights ALM Studio 2011. All rights reserved
 * @autor url		http://alm-studio.net
 * @autor email		info@almstudio.net
 */
defined('_JEXEC') or die('Restricted access');
?>
<table id="listtable">
	<thead>
		<tr>
			<th width="5">
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ID', 'ItemId', $listDirn, $listOrder); ?>
			</th>
			<th width="10">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_CATEGORY', 'ItemCategory', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_TYPE', 'ItemType', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_NOTES', 'ItemNotes', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_THICKNESS', 'ItemThickness', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_WIDTH', 'ItemWidth', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_LENGTH', 'ItemLength', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_QUALITY', 'ItemQuality', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_WEIGHT', 'ItemWeight', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_PRICE', 'ItemPrice', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_COST', 'ItemCost', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ITEM_STATUS', 'ItemStatus', $listDirn, $listOrder); ?>
			</th>		
		</tr>
	</thead>
	<tfoot>	
		<tr>
			<td colspan="13">
				<?php echo $this->pagination->getListFooter(); ?></td>
		</tr>		
	</tfoot>
	<tbody>
		<?php foreach($this->items as $i => $item): 
?>
		<tr class="row<?php echo $i % 2; ?>">
			<td>
			<a href="<?php echo JRoute::_('index.php?option=com_almapc&task=item.edit&ItemId=' . $item->ItemId); ?>">
				<strong><?php echo $item->ItemId; ?></strong>
				</a>
			</td>
			<td>
				<?php echo JHtml::_('grid.id', $i, $item->ItemId); ?>
			</td>
			<td>
				<?php echo $item->ItemCategory; ?>
			</td>
			<td>
				<?php echo $item->ItemType; ?>
			</td>
			<td>
				<?php echo $item->ItemNotes; ?>
			</td>
			<td>
				<?php echo $item->ItemThickness; ?>
			</td>
			<td>
				<?php echo $item->ItemWidth; ?>
			</td>
			<td>
				<?php echo $item->ItemLength; ?>
			</td>
			<td>
				<?php echo $item->ItemQuality; ?>
			</td>
			<td>
				<?php echo $item->ItemWeight; ?>
			</td>
			<td>
				<?php echo $item->ItemPrice; ?>
			</td>
			<td>
				<?php echo $item->ItemCost; ?>
			</td>
			<td>
				<?php echo $item->ItemStatus; ?>
			</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
